/* Modern Design System for Linux.do Data Analyzer */

/* ==== 基础主题变量 ==== */
:root {
    /* 现代色彩系统 */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;

    --color-blue-50: #eff6ff;
    --color-blue-100: #dbeafe;
    --color-blue-200: #bfdbfe;
    --color-blue-300: #93c5fd;
    --color-blue-400: #60a5fa;
    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --color-blue-800: #1e40af;
    --color-blue-900: #1e3a8a;

    --color-indigo-50: #eef2ff;
    --color-indigo-100: #e0e7ff;
    --color-indigo-200: #c7d2fe;
    --color-indigo-300: #a5b4fc;
    --color-indigo-400: #818cf8;
    --color-indigo-500: #6366f1;
    --color-indigo-600: #4f46e5;
    --color-indigo-700: #4338ca;
    --color-indigo-800: #3730a3;
    --color-indigo-900: #312e81;

    /* 渐变色系 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #667eea 0%, #4eb9ff 100%);
    --gradient-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-orange: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --gradient-green: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
    --gradient-dark: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* 默认主题 - 简洁现代 */
    --primary-color: var(--color-blue-500);
    --primary-dark: var(--color-blue-600);
    --primary-light: var(--color-blue-400);
    --text-color: var(--color-slate-700);
    --text-secondary: var(--color-slate-600);
    --text-muted: var(--color-slate-500);
    --card-bg: rgba(255, 255, 255, 0.95);
    --surface-secondary: rgba(255, 255, 255, 0.85);
    --border-color: var(--color-slate-200);
    --background-gradient: linear-gradient(135deg, var(--color-slate-50) 0%, var(--color-blue-50) 100%);

    /* 阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* 动画参数 */
    --transition-base: all 0.2s ease-in-out;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==== 现代化UI组件 ==== */

/* 用户信息展示区域 - 重新设计 */
.user-info-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    margin-bottom: 0;
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.user-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.user-info-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.user-info-section-title {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    position: relative;
}

.user-info-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
}

.user-info-section-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(248, 250, 252, 0.5) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
    min-height: 50px;
}

.user-info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-blue);
    transform: scaleY(0);
    transition: var(--transition-smooth);
}

.user-info-item:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.7) 100%);
    box-shadow: var(--shadow-md);
}

.user-info-item:hover::before {
    transform: scaleY(1);
}

.user-info-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    max-width: 60%;
    word-wrap: break-word;
}

.user-info-value {
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--color-indigo-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: right;
    flex-shrink: 0;
    max-width: 40%;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 美化的统计卡片 */
.stats-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(99, 102, 241, 0.1), transparent 30%);
    animation: rotate 8s linear infinite;
    pointer-events: none;
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.stats-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stats-card-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 徽章展示 */
.badge-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.7) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.badge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-orange);
}

.badge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.badge-timeline-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.6) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--gradient-primary);
    transition: var(--transition-base);
    position: relative;
}

.badge-timeline-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

/* 设备类型卡片 */
.device-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.7) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-blue);
}

.device-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* 权限设置网格 */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.permission-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.7) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-smooth);
    position: relative;
}

.permission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple);
}

.permission-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 表格美化 */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.modern-table thead {
    background: var(--gradient-primary);
}

.modern-table th {
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.modern-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* 动画效果 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeInScale 0.4s ease-out;
}
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* 现代阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-3xl: 0 35px 60px -12px rgba(0, 0, 0, 0.3);

    /* 现代边界半径 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;

    /* 现代渐变 */
    --gradient-brand: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-subtle: linear-gradient(135deg, var(--color-slate-50) 0%, var(--color-blue-50) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
}

/* ==== 小米主题 - 现代 ==== */
[data-theme="xiaomi"] {
    --primary-color: #FF6900;
    --primary-dark: #E55A00;
    --primary-light: #FF8533;
    --text-color: var(--color-slate-800);
    --text-secondary: var(--color-slate-600);
    --text-muted: var(--color-slate-500);
    --card-bg: rgba(255, 255, 255, 0.95);
    --surface-secondary: rgba(255, 255, 255, 0.85);
    --border-color: #E5E7EB;
    --background-gradient: linear-gradient(135deg, #FAFBFF 0%, #FFF5F0 100%);
    --gradient-brand: linear-gradient(135deg, #FF6900 0%, #E55A00 100%);
}

/* ==== 华为主题 - 商务 ==== */
[data-theme="huawei"] {
    --primary-color: #C5282F;
    --primary-dark: #A21E24;
    --primary-light: #DC3545;
    --text-color: var(--color-slate-900);
    --text-secondary: var(--color-slate-700);
    --text-muted: var(--color-slate-600);
    --card-bg: rgba(255, 255, 255, 0.98);
    --surface-secondary: rgba(255, 255, 255, 0.9);
    --border-color: #D1D5DB;
    --background-gradient: linear-gradient(135deg, #FCFCFD 0%, #F9FAFB 100%);
    --gradient-brand: linear-gradient(135deg, #C5282F 0%, #A21E24 100%);
}

/* ==== 现代动画系统 ==== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
    animation-delay: 1s;
}

/* ==== 现代基础样式 ==== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: 'cv03', 'cv04', 'cv11';
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ==== 现代主题切换器 ==== */
.theme-selector {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.theme-btn {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid var(--color-slate-200);
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.theme-btn:hover::before {
    left: 100%;
}

.theme-btn.active {
    background: var(--gradient-brand) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    box-shadow: var(--shadow-lg);
}

.theme-btn:not(.active) {
    background: var(--surface-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.theme-btn:not(.active):hover {
    background: var(--surface-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ==== 现代卡片系统 ==== */
.card {
    background: var(--surface-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

/* ==== 现代进度条 ==== */
.progress-shimmer {
    position: relative;
    overflow: hidden;
}

.progress-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    animation: shimmer-move 2s ease-in-out infinite;
}

@keyframes shimmer-move {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ==== 现代按钮系统 ==== */
.btn-modern {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-modern:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-blue-600) 0%, var(--color-indigo-700) 100%);
}

/* ==== 现代上传区域 ==== */
#uploadArea {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-3xl);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#uploadArea:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-2xl);
}

#uploadArea.drag-over {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--color-blue-50) 0%, var(--color-indigo-50) 100%);
    transform: scale(1.02);
}

/* ==== 现代模态框 ==== */
#helpModal {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#helpModal .bg-white\\/10 {
    background: var(--gradient-glass);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-2xl);
}

/* ==== 现代文字系统 ==== */
.text-brand-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==== 现代表格 ==== */
.data-table {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.data-table th {
    background: var(--color-slate-50);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: var(--color-blue-50);
}

.data-table tr:hover td {
    color: var(--text-primary);
}

/* ==== 现代摘要卡片 ==== */
.summary-card {
    background: var(--surface-primary) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--radius-2xl) !important;
    box-shadow: var(--shadow-lg) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.summary-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-2xl) !important;
}

.summary-card .w-16 {
    background: var(--gradient-brand) !important;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* ==== 现代动画序列 ==== */
.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }
.summary-card:nth-child(4) { animation-delay: 0.4s; }
.summary-card:nth-child(5) { animation-delay: 0.5s; }
.summary-card:nth-child(6) { animation-delay: 0.6s; }
.summary-card:nth-child(7) { animation-delay: 0.7s; }
.summary-card:nth-child(8) { animation-delay: 0.8s; }

/* ==== 响应式设计 ==== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --spacing-3xl: 2.5rem;
    }

    .theme-selector {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .theme-btn {
        width: 100%;
        justify-content: center;
    }

    #uploadArea {
        padding: var(--spacing-xl);
    }

    .summary-card {
        padding: var(--spacing-lg) !important;
    }

    .summary-card .text-2xl {
        font-size: 1.25rem !important;
    }

    .summary-card .w-16 {
        width: 3rem !important;
        height: 3rem !important;
    }

    /* 用户信息区域移动端优化 */
    .user-info-section {
        min-height: auto;
    }

    .user-info-section-content {
        padding: 1rem;
    }

    .user-info-item {
        padding: 0.5rem 0.75rem;
        min-height: 40px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .user-info-label,
    .user-info-value {
        max-width: 100%;
        text-align: left;
        justify-content: flex-start;
    }

    .user-info-value {
        font-size: 0.8rem;
    }
}

/* 分类活动分析表格美化 */
.category-analysis-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.category-analysis-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-analysis-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border: none;
}

.category-analysis-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.category-analysis-table tbody tr:hover {
    background-color: #f9fafb;
}

.category-analysis-table tbody td {
    padding: 12px 16px;
    color: #374151;
    font-size: 14px;
}

.category-analysis-table tbody tr:last-child {
    border-bottom: none;
}

/* 活动分析区域调整 */
#tab-activity .table-container {
    width: 100%;
    overflow-x: auto;
}

/* ==== 可访问性改进 ==== */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==== 打印样式 ==== */
@media print {
    body {
        background: white !important;
    }

    .bg-white\\/90,
    .bg-white\\/80,
    .summary-card {
        background: white !important;
        box-shadow: none !important;
    }

    .no-print {
        display: none !important;
    }
}

/* 小米主题 - 现代商务 */
[data-theme="xiaomi"] {
    --primary-color: #FF6900;
    --primary-light: #FF8533;
    --primary-dark: #E55A00;
    --secondary-color: #F7F8FC;
    --accent-color: #FF6900;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --background-primary: linear-gradient(135deg, #FAFBFF 0%, #F1F5F9 100%);
    --background-secondary: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.98);
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6B7280;
    --border-color: rgba(229, 231, 235, 0.8);
    --shadow-color: rgba(255, 105, 0, 0.08);
    --sidebar-bg: #FFFFFF;
    --header-bg: #FFFFFF;
}

/* 华为主题 - 企业级专业 */
[data-theme="huawei"] {
    --primary-color: #C5282F;
    --primary-light: #DC3545;
    --primary-dark: #A21E24;
    --secondary-color: #F8F9FB;
    --accent-color: #C5282F;
    --success-color: #059669;
    --warning-color: #D97706;
    --error-color: #DC2626;
    --background-primary: linear-gradient(135deg, #FCFCFD 0%, #F1F3F4 100%);
    --background-secondary: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --border-color: rgba(226, 232, 240, 0.7);
    --shadow-color: rgba(197, 40, 47, 0.06);
    --sidebar-bg: #FFFFFF;
    --header-bg: #FFFFFF;
}

/* 应用主题变量 */
body {
    background: var(--background-primary) !important;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 主题切换器样式 - 更专业 */
.theme-selector {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.theme-btn {
    position: relative;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-weight: 500;
}

.theme-btn:hover {
    background: var(--secondary-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.theme-btn.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px var(--shadow-color);
}

/* 专业卡片样式 */
.summary-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

.summary-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px);
}

.summary-card .w-16,
.summary-card .w-12 {
    background: var(--primary-color) !important;
}

/* 专业容器样式 */
.bg-white\\/10,
.bg-white\\/95 {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* 专业按钮样式 */
.bg-gradient-to-r.from-blue-500.to-purple-600,
.bg-blue-500,
.bg-primary {
    background: var(--primary-color) !important;
    border: none;
    box-shadow: 0 1px 2px 0 var(--shadow-color);
}

.bg-gradient-to-r.from-blue-500.to-purple-600:hover,
.bg-blue-500:hover,
.bg-primary:hover {
    background: var(--primary-dark) !important;
    box-shadow: 0 2px 4px 0 var(--shadow-color);
}

/* 专业文字样式 */
.bg-gradient-to-r.from-blue-400.via-purple-400.to-pink-400 {
    background: var(--primary-color) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.text-white\\/80,
.text-white\\/70 {
    color: var(--text-secondary) !important;
}

/* 修复白色文字覆盖问题 */
.text-white {
    color: var(--text-primary) !important;
}

.text-gray-300,
.text-gray-400,
.text-gray-500,
.text-gray-600 {
    color: var(--text-secondary) !important;
}

.text-gray-700,
.text-gray-800,
.text-gray-900 {
    color: var(--text-primary) !important;
}

/* 确保表格和容器文字可见 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
}

p, span, div:not(.bg-gradient-to-r) {
    color: var(--text-secondary);
}

/* 确保标签和提示文字可见 */
.text-sm {
    color: var(--text-muted) !important;
}

.font-medium {
    color: var(--text-primary) !important;
}

/* 移除花哨的背景装饰 */
.bg-purple-500,
.bg-blue-500,
.bg-pink-500 {
    display: none !important;
}

/* 专业的数据表格 */
.data-table {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
}

.data-table th {
    background: var(--secondary-color);
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.data-table td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
}

.data-table tr:hover {
    background: var(--secondary-color);
}

.data-table tr:hover td {
    color: var(--text-primary) !important;
}

/* 表格内容文字修复 */
table td,
table th,
.table td,
.table th {
    color: var(--text-primary) !important;
}

table tbody tr:hover td {
    color: var(--text-primary) !important;
}

/* 统计卡片文字修复 */
.summary-card h3,
.summary-card p,
.summary-card span {
    color: var(--text-primary) !important;
}

.summary-card .text-sm {
    color: var(--text-muted) !important;
}

/* 通用文字修复 - 覆盖所有白色文字 */
.text-white:not(.theme-btn.active) {
    color: var(--text-primary) !important;
}

/* 按钮文字保持白色（在有色背景上） */
.bg-blue-500,
.bg-primary,
.btn-primary {
    color: white !important;
}

/* Toast 和 Modal 文字修复 */
.toast,
.modal,
.dropdown-menu {
    color: var(--text-primary) !important;
}

/* 进度条文字修复 */
.progress-text {
    color: var(--text-primary) !important;
}

/* 专业的链接按钮 */
.data-table td a {
    background: var(--secondary-color) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--border-color) !important;
    font-weight: 500;
}

.data-table td a:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Smooth animations with improved performance */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 高级动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes bounceIn {
    0%, 20%, 40%, 60%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(.9, .9, .9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(.97, .97, .97);
    }
    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* 页面加载动画 */
.page-content {
    animation: fadeInUp 0.6s ease-out;
}

.summary-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }
.summary-card:nth-child(4) { animation-delay: 0.4s; }
.summary-card:nth-child(5) { animation-delay: 0.5s; }
.summary-card:nth-child(6) { animation-delay: 0.6s; }
.summary-card:nth-child(7) { animation-delay: 0.7s; }
.summary-card:nth-child(8) { animation-delay: 0.8s; }

/* 增强的悬停效果 */
.summary-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 加载状态动画 */
.loading-shimmer {
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 800px 104px;
    animation: shimmer 1.2s ease-in-out infinite;
}

/* 数据表格行动画 */
.data-table tbody tr {
    animation: slideInRight 0.3s ease-out;
    animation-fill-mode: both;
}

.data-table tbody tr:nth-child(odd) { animation-delay: 0.05s; }
.data-table tbody tr:nth-child(even) { animation-delay: 0.1s; }

/* Toast 通知增强动画 */
.toast-success {
    animation: bounceIn 0.6s ease-out;
}

/* 进度条动画增强 */
.progress-bar {
    background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.3) 25%, rgba(255,255,255,0.3) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.3) 75%);
    background-size: 20px 20px;
    animation: progress-animation 1s linear infinite;
}

/* 图标旋转动画 */
.icon-spin {
    animation: spin 2s linear infinite;
}

.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 文件上传区域增强效果 */
#uploadArea {
    position: relative;
    overflow: hidden;
}

#uploadArea::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#uploadArea:hover::before {
    opacity: 1;
    animation: spin 10s linear infinite;
}

#uploadArea.drag-over {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
}

/* 搜索框增强效果 */
#searchInput:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按钮点击效果 */
.btn-press {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* 卡片出现动画 */
.card-appear {
    animation: fadeInUp 0.5s ease-out;
}

/* 统计数字计数动画 */
.counter-animate {
    animation: bounceIn 0.8s ease-out;
}

/* 图表容器动画 */
.chart-container {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.chart-container:nth-child(1) { animation-delay: 0.2s; }
.chart-container:nth-child(2) { animation-delay: 0.4s; }
.chart-container:nth-child(3) { animation-delay: 0.6s; }
.chart-container:nth-child(4) { animation-delay: 0.8s; }
.chart-container:nth-child(5) { animation-delay: 1.0s; }

/* 移动端触摸反馈 */
@media (max-width: 768px) {
    .mobile-device .summary-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .mobile-device .tab-button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    .mobile-device .pagination-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    /* 移动端链接按钮优化 */
    .data-table td a {
        @apply text-xs px-1 py-0.5;
    }

    .data-table td .flex {
        @apply flex-col gap-0.5;
    }
}

/* 链接按钮样式增强 */
.data-table td a {
    @apply no-underline;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

.data-table td a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: currentColor;
}

.data-table td a:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Upload area drag effects */
.drag-over {
    @apply border-primary-400 bg-primary-100/70 scale-105;
}

/* Chart container responsive */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Toast notification animations */
.toast-enter {
    transform: translateX(100%);
    opacity: 0;
}

.toast-enter-active {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s ease-out;
}

.toast-exit {
    transform: translateX(0);
    opacity: 1;
}

.toast-exit-active {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Loading spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Card hover effects */
.summary-card {
    @apply transform hover:scale-105 transition-all duration-300;
}

/* Button focus states */
button:focus {
    @apply outline-none ring-4 ring-primary-200;
}

/* Progress bar animation */
.progress-bar-animated {
    background: linear-gradient(
        45deg,
        transparent 25%,
        rgba(255, 255, 255, 0.2) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 50%,
        transparent 75%,
        rgba(255, 255, 255, 0.2) 75%
    );
    background-size: 20px 20px;
    animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}

/* Tab button styles */
.tab-button {
    @apply border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200;
}

.tab-button.active {
    @apply border-primary-500 text-primary-600;
}

.tab-button:hover {
    @apply transform -translate-y-0.5;
}

/* Data table styles */
.data-table {
    @apply w-full border-collapse;
}

.data-table th {
    @apply bg-gray-50 text-left p-3 font-semibold text-gray-700 border-b sticky top-0;
}

.data-table td {
    @apply p-3 border-b border-gray-100 text-sm;
}

.data-table tr:hover {
    @apply bg-gray-50;
}

.data-table tr:nth-child(even) {
    @apply bg-gray-25;
}

/* Table container with max height for scrolling */
.table-container {
    @apply max-h-96 overflow-y-auto border rounded-lg;
}

/* User info card styles */
.user-info-section {
    @apply mb-8 bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden;
}

.user-info-section-title {
    @apply text-lg font-bold text-gray-800 bg-gradient-to-r from-gray-50 to-white px-6 py-4 border-b border-gray-200;
}

.user-info-grid {
    @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 p-6;
}

.user-info-item {
    @apply bg-gradient-to-br from-white to-gray-50 p-4 rounded-lg border border-gray-200 hover:shadow-md transition-all duration-200;
}

.user-info-label {
    @apply text-sm font-medium text-gray-500 mb-1;
}

.user-info-value {
    @apply text-lg font-semibold text-gray-800;
}

/* Data completeness progress bar */
.completeness-bar {
    @apply w-full bg-gray-200 rounded-full h-3;
}

.completeness-fill {
    @apply h-3 rounded-full transition-all duration-500 ease-out;
}

/* Category and badge grid items */
.category-item {
    @apply bg-gradient-to-r from-blue-50 to-indigo-50 p-4 rounded-lg border border-blue-200 hover:from-blue-100 hover:to-indigo-100 transition-all duration-200;
}

.badge-item {
    @apply bg-gradient-to-r from-yellow-50 to-orange-50 p-3 rounded-lg border border-yellow-200 text-center hover:from-yellow-100 hover:to-orange-100 transition-all duration-200;
}

/* Analysis section styles */
.analysis-item {
    @apply bg-white p-4 rounded-lg border border-gray-200 shadow-sm;
}

.analysis-header {
    @apply font-semibold text-gray-700 mb-2;
}

.analysis-value {
    @apply text-2xl font-bold text-gray-900;
}

.analysis-description {
    @apply text-sm text-gray-500;
}

/* Responsive table styles */
@media (max-width: 768px) {
    .data-table {
        @apply text-xs;
    }

    .data-table th,
    .data-table td {
        @apply p-2;
    }

    .tab-button {
        @apply text-xs px-2 py-3;
    }

    #dataTableTabs {
        @apply flex-wrap gap-2;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        @apply px-2;
    }

    .grid-responsive {
        @apply grid-cols-1;
    }

    .chart-container {
        height: 300px;
    }

    .user-info-item {
        @apply p-3;
    }

    .user-info-value {
        @apply text-base;
    }

    /* 移动端分页控件优化 */
    .pagination-btn {
        @apply px-2 py-1 text-xs;
    }

    /* 移动端搜索框优化 */
    #searchInput {
        @apply text-sm px-3 py-2;
    }

    #pageSizeSelect {
        @apply text-sm px-2 py-2;
    }

    /* 移动端表格优化 */
    .data-table {
        @apply text-xs;
    }

    .data-table th {
        @apply px-2 py-2 text-xs;
    }

    .data-table td {
        @apply px-2 py-2 text-xs;
        /* 长文本换行 */
        word-break: break-word;
        max-width: 120px;
    }

    /* 移动端标签页优化 */
    .tab-button {
        @apply text-xs px-2 py-2;
    }

    #dataTableTabs {
        @apply flex-wrap gap-1;
    }

    /* 移动端卡片布局优化 */
    #summaryCards {
        @apply grid-cols-2 gap-3;
    }

    .summary-card {
        @apply p-4;
    }

    .summary-card .text-2xl {
        @apply text-lg;
    }

    .summary-card .w-16 {
        @apply w-12 h-12 text-lg;
    }

    /* 移动端控制按钮优化 */
    .flex.items-center.gap-3 {
        @apply flex-col gap-2 items-stretch;
    }

    .flex.flex-col.sm\\:flex-row.sm\\:items-center.sm\\:justify-between {
        @apply gap-3;
    }

    /* 移动端toast优化 */
    .toast-enter {
        @apply max-w-xs text-sm;
    }

    /* 移动端模态框优化 */
    #loadingOverlay {
        @apply px-4;
    }

    #progressContainer {
        @apply mx-4;
    }

    /* 移动端文件上传区域优化 */
    #uploadArea {
        @apply p-6;
    }

    #uploadArea .text-6xl {
        @apply text-4xl;
    }

    #uploadArea .text-xl {
        @apply text-lg;
    }

    /* 移动端导航栏优化 */
    .bg-white\\/95.backdrop-blur-sm.shadow-lg.rounded-2xl.p-6.mb-8 h2 {
        @apply text-xl;
    }

    /* 移动端分析结果区域优化 */
    .grid.grid-cols-1.lg\\:grid-cols-3.gap-6 {
        @apply gap-4;
    }

    /* 移动端数据完整性显示优化 */
    .grid.grid-cols-1.md\\:grid-cols-3.gap-6 {
        @apply gap-4;
    }

    /* 移动端分页控件完全隐藏部分按钮 */
    .pagination-btn:nth-child(n+6):nth-child(-n+10) {
        @apply hidden;
    }

    /* 移动端只显示核心分页按钮 */
    .flex.items-center.space-x-1 {
        @apply space-x-0.5;
    }
}

/* Utility classes for modern design */
.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.shadow-modern {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Progress bar shimmer effect */
.progress-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    background-size: 50px 100%;
    animation: shimmer-slide 2s ease-in-out infinite;
}

@keyframes shimmer-slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Enhanced help modal styles */
.help-section {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.help-section h4 {
    color: var(--text-primary) !important;
}

.help-section ol li,
.help-section ul li {
    color: var(--text-secondary) !important;
}

.help-section a {
    color: var(--primary-color) !important;
}

/* Modal backdrop blur effect */
#helpModal {
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#helpModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#helpModal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

/* Modal content animation */
#helpModal .bg-white\\/10 {
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#helpModal:not(.hidden) .bg-white\\/10 {
    transform: scale(1);
}

/* Enhanced progress bar */
#progressBar {
    position: relative;
    overflow: hidden;
}

#progressPercent {
    font-size: 10px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Loading dots animation */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.loading-dots > div {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots > div:nth-child(1) { animation-delay: -0.32s; }
.loading-dots > div:nth-child(2) { animation-delay: -0.16s; }
.loading-dots > div:nth-child(3) { animation-delay: 0s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Improved mobile responsiveness for help modal */
@media (max-width: 768px) {
    #helpModal .max-w-2xl {
        max-width: 95vw;
        margin: 1rem;
    }

    #helpModal .p-8 {
        padding: 1.5rem;
    }

    .help-section ol,
    .help-section ul {
        padding-left: 1rem;
    }

    .help-section ol li span:first-child {
        min-width: 1.5rem;
        height: 1.5rem;
        font-size: 0.7rem;
    }
}

/* 标签页样式 */
.analysis-tab {
  padding: 0.75rem 1.5rem;
  margin: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.analysis-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
}

.analysis-tab.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  font-weight: 600;
}

.tab-content {
  animation: fadeIn 0.3s ease;
  color: rgba(255, 255, 255, 0.95);
}

.tab-content.hidden {
  display: none;
}

/* 标签页内部的标题和文字 - 改进版 */
.tab-content h3,
.tab-content h4 {
  color: #1f2937 !important;
  text-shadow: none;
  font-weight: 700;
}

.tab-content p,
.tab-content span,
.tab-content div {
  color: #374151 !important;
}

.tab-content .text-white {
  color: #1f2937 !important;
}

.tab-content .text-gray-500,
.tab-content .text-gray-600 {
  color: #6b7280 !important;
}

/* 不同标签页的特殊样式 */
#tab-overview .bg-white\/5,
#tab-user .bg-white\/5,
#tab-badges .bg-white\/5,
#tab-advanced .bg-white\/5 {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

#tab-activity .bg-white\/5,
#tab-charts .bg-white\/5 {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* 标签页内的卡片标题 */
.tab-content .bg-white\/5 h3 {
  color: #111827 !important;
  background: linear-gradient(to right, #f9fafb, #f3f4f6);
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0.75rem 0.75rem 0 0;
}

/* 标签页内的图标颜色保持原色 */
.tab-content i.fas {
  opacity: 0.8;
}

/* 详细数据标签页特殊背景 - 使用浅色背景 */
#tab-details .bg-white\/5 {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* 详细数据标签页内的控件 - 深色文字 */
#tab-details * {
  color: #374151;
}

#tab-details h3 {
  color: #1f2937 !important;
  text-shadow: none;
}

#tab-details label {
  color: #4b5563 !important;
  font-weight: 500;
}

#tab-details select,
#tab-details input {
  background: white !important;
  color: #1f2937 !important;
  border: 1px solid #d1d5db !important;
}

#tab-details select option {
  background: white !important;
  color: #1f2937 !important;
}

#tab-details select:focus,
#tab-details input:focus {
  background: white !important;
  border-color: #6366f1 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#tab-details input::placeholder {
  color: #9ca3af !important;
}

/* 分页控件 - 浅色主题 */
#paginationControls {
  color: #374151 !important;
}

#paginationControls button,
#tab-details .pagination-btn {
  background: white !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
  font-weight: 500;
}

#paginationControls button:hover:not(:disabled),
#tab-details .pagination-btn:hover:not(:disabled) {
  background: #f3f4f6 !important;
  border-color: #9ca3af !important;
  transform: translateY(-1px);
}

#paginationControls button:disabled,
#tab-details .pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#pageNumbers button {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  margin: 0 0.125rem;
  background: white !important;
  color: #374151 !important;
  border: 1px solid #e5e7eb !important;
}

#pageNumbers button:hover {
  background: #f3f4f6 !important;
}

#pageNumbers button.active {
  background: #6366f1 !important;
  color: white !important;
  border-color: #6366f1 !important;
  font-weight: 600;
}

/* 数据表格样式 - 浅色主题 */
#dataTableContent {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

#dataTableContent table {
  width: 100%;
  color: #374151 !important;
}

#dataTableContent th {
  background: #f9fafb !important;
  color: #374151 !important;
  font-weight: 600;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid #e5e7eb;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

#dataTableContent td {
  color: #4b5563 !important;
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}

#dataTableContent tr:hover td {
  background: #f9fafb !important;
}

#dataTableContent a {
  color: #6366f1 !important;
  text-decoration: none;
  font-weight: 500;
}

#dataTableContent a:hover {
  color: #4f46e5 !important;
  text-decoration: underline;
}

/* 空数据提示 */
#dataTableContent .text-center {
  color: #9ca3af !important;
}

#dataTableContent .text-center p {
  color: #9ca3af !important;
}

/* 数据表格子标签按钮样式 - 浅色主题 */
.tab-button {
  padding: 0.5rem 1rem;
  background: white;
  color: #6b7280;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: none;
}

.tab-button:hover {
  color: #374151;
  background: #f9fafb;
  border-bottom-color: #d1d5db;
}

.tab-button.active {
  color: #6366f1;
  background: white;
  border-bottom-color: #6366f1;
  font-weight: 600;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 已存储数据列表样式 */
.stored-data-item {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stored-data-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
  border-color: #6366f1 !important;
}

.stored-data-item:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

.stored-data-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stored-data-item:hover::before {
  opacity: 1;
}

/* 分类活动分析表格样式 */
#categorySection {
  width: 100% !important;
}

#categoryContent {
  width: 100% !important;
  overflow-x: auto;
}

#categoryContent table {
  width: 100% !important;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

#categoryContent th {
  background: linear-gradient(to right, #6366f1, #8b5cf6);
  color: white !important;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}

#categoryContent td {
  padding: 0.75rem 1rem;
  color: #374151 !important;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}

#categoryContent tr:hover td {
  background: #f9fafb !important;
}

#categoryContent tr:last-child td {
  border-bottom: none;
}

/* 分类名称列特殊样式 */
#categoryContent td:first-child {
  font-weight: 600;
  color: #1f2937 !important;
}

/* 数字列右对齐 */
#categoryContent td:not(:first-child) {
  text-align: center;
  font-family: 'SF Mono', Monaco, monospace;
}

/* 数据表格标签按钮样式 */
.tab-button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.tab-button.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}